from pptx import Presentation

doc = Presentation("./tmp.dotx")

for slide in doc.slides:
    for shape in slide.shapes:
        if shape.has_text_frame:
            print(shape.text)
